<template>
  <div>
     <div @tap="tologin" v-if="flag">
       <button>登陆才能看</button>
     </div>
    <div class="order-wrap" v-else>
      <div class="order-box">
        <div class="order-top">
          <div class="order-t-l">
            <p class="B-title">兔蜜鲜果</p><img  class="jd" src="../../../static/images/youjiantou.png" alt="" />
          </div>
          <p class="status">已完成</p>

        </div>
        <div class="order-center">
          <div class="order-c-l">
            <img  class="order-i" src="../../../static/images/choujiang.png" alt="" />
          </div>
          <div class="order-c-r">
            <p class="price">￥998</p>
            <p class="num">共1件</p>
            <p class="waima">过来拿阿</p>
          </div>
        </div>
        <div class="order-bottom">
            07-25 11:33

        </div>
      </div>
    </div>
  </div>
</template>

<script>



export default {
  components: {},

  data() {
    return {
      flag:false,
      }
    },
  methods:{
    tologin(){
      wx.navigateTo({
        url: '/pages/tologin/main'
      })
    },
  },
  onShow(){
    this.flag=this.global.loginflag;
  }
}
</script>

<style scoped>
.order-wrap{
  height:330rpx;
  width:100%;
  background-color: #fff;
}
  .order-box{
    height: 100%;
    width:90%;
    margin:0 auto;
  }
  .order-top{
    height:25%;
    width:100%;
    border-bottom: 1px solid #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;

  }
  .order-center{
    height: 50%;
    width:100%;
    border-bottom: 1px solid #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .order-bottom{
    height: 25%;
    width:100%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #cccccc;
  }
  .jd{
    height: 40rpx;
    width:40rpx;
  }
  .order-t-l{
    display: flex;
    align-items: center;
    font-weight: 700;
  }
  .order-c-l{
    width:60%;
    height: 100%;
    display: flex;
    align-items: center;
  }
  .order-i{
    height: 120rpx;
    width:120rpx;
  }
  .order-c-r{
    height: 100%;
    width:40%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content:center;
}
  .price{
    text-align:right;
    color:red;
    font-size:35rpx;

  }
  .num{
    text-align:right;
    font-size:24rpx;
  }
  .waima{
    text-align:center;
    border:1px solid aqua;
    border-radius:10rpx;
    width:48%;
    color:aqua;
    font-size:22rpx;
  }
button {
  z-index: 1;
  color: white;
  background: #40a9ff;
  outline: none;
  border: none;
  padding: 0.5em 1em;
}
button:hover {
  cursor: pointer;
  animation: jelly 0.5s;
}
@keyframes jelly {
  0%,
  100% {
    transform: scale(1, 1);
  }

  33% {
    transform: scale(0.9, 1.1);
  }

  66% {
    transform: scale(1.1, 0.9);
  }
}
@keyframes jelly {
  0%,
  100% {
    transform: scale(1, 1);
  }

  25%,
  75% {
    transform: scale(0.9, 1.1);
  }

  50% {
    transform: scale(1.1, 0.9);
  }
}
</style>
